package galaxy.auth.provider.controller;

import galaxy.auth.provider.dto.reponse.ResponseBean;
import galaxy.auth.provider.dto.reponse.music.MusicRes;
import galaxy.auth.provider.service.IMusicInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: Bing
 * @Date: 2020/9/24 14:29
 * @Description:
 */
@Api(tags = "专辑")
@RestController
public class AlbumController {

    @Autowired
    IMusicInfoService musicInfoService;

    @ApiOperation("获取音乐列表")
    @RequestMapping(value = "/getLiveAlbum",method = RequestMethod.GET)
    public ResponseBean<List<MusicRes>> getLiveAlbum() {
      return musicInfoService.getMusicList();
    }

    @ApiOperation("获取音乐详情")
    @RequestMapping(value = "/getAlbumInfo",method = RequestMethod.GET)
    public ResponseBean<MusicRes> getAlbumInfo() {
        return musicInfoService.getMusicInfo();
    }

}